package com.fzy.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName t_role
 */
@TableName(value ="t_role")
@Data
public class Role implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long rolId;

    /**
     * 
     */
    private String rolName;

    /**
     * 
     */
    private String rolType;

    /**
     * 
     */
    private String rolDesc;

    /**
     * 
     */
    private Date gmtCreate;

    /**
     * 
     */
    private Date gmtModified;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Role other = (Role) that;
        return (this.getRolId() == null ? other.getRolId() == null : this.getRolId().equals(other.getRolId()))
            && (this.getRolName() == null ? other.getRolName() == null : this.getRolName().equals(other.getRolName()))
            && (this.getRolType() == null ? other.getRolType() == null : this.getRolType().equals(other.getRolType()))
            && (this.getRolDesc() == null ? other.getRolDesc() == null : this.getRolDesc().equals(other.getRolDesc()))
            && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRolId() == null) ? 0 : getRolId().hashCode());
        result = prime * result + ((getRolName() == null) ? 0 : getRolName().hashCode());
        result = prime * result + ((getRolType() == null) ? 0 : getRolType().hashCode());
        result = prime * result + ((getRolDesc() == null) ? 0 : getRolDesc().hashCode());
        result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", rolId=").append(rolId);
        sb.append(", rolName=").append(rolName);
        sb.append(", rolType=").append(rolType);
        sb.append(", rolDesc=").append(rolDesc);
        sb.append(", gmtCreate=").append(gmtCreate);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}